package fiziksobject;

import physics.Forcer;
import physics.Vector;
import physics.physicsobject;
import physics.Vector.Type;

public class electricField implements Forcer{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Vector efVector;
	
	public electricField(Vector v){
		efVector = v;
	}

	public Vector[] getForces(physicsobject p) {
		double q = p.getCharge();
		Vector[] vec ={efVector.multiply(q).toType(Type.FORCE_ELECTRIC)};
	    return vec;
	}

	public Vector getField() {
		return efVector;
	}
	
	public void setField(Vector f) {
		efVector = f;
	}

}
